<?php
//使用遍历树函数 实例
include '../tool/1.php';
include '../common.php';
$dirs=  Dir::tree("..");
?>
<table border='1'>
    <tr>
        <td>名称</td>
        <td>修改时间</td>
        <td>文件？目录？</td>
        <td>是否可写</td>
        <td>是否可读</td>
    </tr>
    <?php
    foreach ($dirs as $d):
    ?>
    <tr>
         <td>
             <?php if($d['type']=='dir'):?>
             <img src='1.jpg' width='30'/>
             <?php endif;?>
             <?php if($d['type']=='file'):?>
             <img src='2.jpg' width='30'/>
             <?php endif;?>
             <?php echo $d['filename'];?>
         </td>
         <td><?php echo date("Y-m-d H:i", $d['filemtime']);?></td>
         <td><?php echo $d['type'];?></td>
        <td><?php echo $d['iswrite'];?></td>
        <td><?php echo $d['isread'];?></td>    
    </tr>           
    <?php    endforeach;?>
</table>